<?php
/**
 * common.php               入口通用包含文件
 *
 * @author                  mashanling <msl-138@163.com>
 * @date                    2012-12-24 11:30:28
 * @lastmodify             2012-12-24 11:30:28 by mashanling
 */

!defined('WWWROOT') && exit('Access Denied');

ob_get_level() != 0 && ob_end_clean();

function_exists('ob_gzhandler') ? ob_start('ob_gzhandler') : ob_start();

header('content-type: text/html; charset=utf-8');

require(INCLUDE_PATH . 'app_config.php');

if (IS_LOCAL && APP_DEBUG) {//本地开发环境by mashanling on 2012-09-12 14:08:24
    error_reporting(E_ALL|E_STRICT);//错误报告
    ini_set('display_errors', 1);//显示错误
}
else {
    ini_set('display_errors', 0);
}

$config = '';
$app = new Yaf\Application(APP_PATH_UP . 'couf.application.ini', APP_NAME);
$app->bootstrap()->run();